<template>

    <div class="main_menu">
        <router-link to="/" class="btn" :class="index==0?'activate':''">
            <i class="icon iconfont icon-shouye"></i>
            <span>首页</span>
        </router-link>
        <router-link to="/pages/cate/list" class="btn" :class="index==1?'activate':''">
            <i class="icon iconfont icon-leimupinleifenleileibie"></i>
            <span>分类</span>
        </router-link>
        <router-link :to="'/pages/home/index?group_code='+group_code" class="btn" :class="index==2?'activate':''">
            <i class="icon iconfont icon-qunzu"></i>
            <span>推荐</span>
        </router-link>
        <router-link to="/pages/setting/index" class="btn" :class="index==3?'activate':''">
            <i class="icon iconfont icon-wode"></i>
            <span>我的</span>
        </router-link>
    </div>
</template>

<script>

    export default {
        props:['index','group_code']
    }
</script>

<style lang="less" scoped>
    .main_menu{
        position: fixed;
        width: 100%;
        height:49px;
        border-top:1px solid #999;
        bottom: 0;
        display: flex;
        background-color: #FFF;
        a{
            display: block;
            flex: 1;
            text-align: center;
            i{
                display: block;
                font-size: 24px;
                margin-top: 5px;
            }
            span{
                font-size: 14px;
                display: block;
                width: 100%;
                line-height: 20px;
            }
        }
        .activate{
            color: #FF6600;
        }
    }

</style>